package com.zkld.frame.controller;

import com.zkld.frame.dto.ResponseDTO;
import com.zkld.frame.entitys.User;
import com.zkld.frame.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/registered")
    public ResponseDTO registered(User user) {
        return userService.registered(user);
    }
}
